import { _get, _post, _put, _delete } from 'utils/request'
import { UserEditBody, UserListQuery } from 'types/user'

// 用户管理
export const listUser = (query: UserListQuery): Promise<any> => _get('/oa/user', query)
export const addUser = (body: UserEditBody): Promise<any> => _post('/oa/user', body)
export const updateUser = (id: number, body: UserEditBody): Promise<any> => _put(`/oa/user/${id}`, body)
export const deleteUser = (id: number): Promise<any> => _delete(`/oa/user/${id}`)
